import 'dart:io';

import 'package:flutter/material.dart';
import 'package:aweb5/base/BaseWidget.dart';
import 'package:aweb5/util/HttpUtils1.dart';
import 'HttpUtil.dart';

class HttpClient {
  static Future<Map<String, dynamic>> requestHome(String url,
      {Map<String, dynamic> data}) async {
    return HttpUtils.get(url, data: data);
  }
  static Future<Map<String, dynamic>> requestCate(String url,
      {Map<String, dynamic> data}) async {
    return HttpUtils.get(url, data: data);
  }
  static Future<Map<String, dynamic>> requestProductDetail(String url,
      {Map<String, dynamic> data}) async {
    return HttpUtils.get(url, data: data);
  }
  static Future<Map<String, dynamic>> requestProductList(String url,
      {Map<String, dynamic> data}) async {
    return HttpUtils.get(url, data: data);
  }
  static Future<Map<String, dynamic>> requestOrderList(String url,
      {Map<String, dynamic> data}) async {
    return HttpUtils.get(url, data: data);
  }
  static Future<Map<String, dynamic>> requestLogin(String url,
      {Map<String, dynamic> data}) async {
    return HttpUtils.post(url, data: data);
  }
  static Future<Map<String, dynamic>> requestUpload(File file,
      bool image) async {
    return HttpUtils.upload(file, image);
  }

  static Future<Map<String, dynamic>> requestTencent(String url,
      {Map<String, dynamic> data}) async {
    return HttpUtils.get(url, data: data);
  }


}
